From 4eebbb2ff5df645655813a530b84a6395a44bffd Mon Sep 17 00:00:00 2001 From: Anita Date: Tue, 21 Apr 2026 17:36:49 +0100 Subject: offices ajuste de cabecera --- src/app/(protected)/offices/[officeId].tsx | 198 +++++++++++++++-------------- 1 file changed, 103 insertions(+), 95 deletions(-) (limited to 'src/app/(protected)/offices/[officeId].tsx') diff --git a/src/app/(protected)/offices/[officeId].tsx b/src/app/(protected)/offices/[officeId].tsx index 91e6905..16a60cf 100644 --- a/src/app/(protected)/offices/[officeId].tsx +++ b/src/app/(protected)/offices/[officeId].tsx @@ -48,14 +48,14 @@ export default function OfficeDetailScreen() { return ( - {error ?? 'No se pudo cargar el espacio'} + {error ?? "No se pudo cargar el espacio"} Reintentar - + Volver @@ -68,62 +68,53 @@ export default function OfficeDetailScreen() { const isAvailable = office.available ?? true; return ( - - - {/* HEADER */} - - - ← Volver a espacios - - + + {/* cabecera superior */} + + + + + ← Volver a espacios + + + + + {/* IMAGE */} - {/* - 🏢 - */} - - - + + + {/* TITLE */} - + {office.name} - {office.location ?? 'Sin ubicación'} + {office.location ?? "Sin ubicación"} - + - {isAvailable ? 'Disponible' : 'Ocupado'} + {isAvailable ? "Disponible" : "Ocupado"} - {/* CAPACITY + PRICE */} + {/* CAPACITY */} - - {office.capacity} personas - - - {/* - {office.price ?? '—'} - */} + {office.capacity} personas {/* DESCRIPTION */} @@ -148,6 +139,7 @@ export default function OfficeDetailScreen() { value={selectedDate} onChangeText={setSelectedDate} placeholder="YYYY-MM-DD" + placeholderTextColor={theme.colors.textSecondary} keyboardType="number-pad" maxLength={10} /> @@ -177,9 +169,7 @@ export default function OfficeDetailScreen() { {reservation.startTime} - {reservation.endTime} - - Ocupado - + Ocupado ))} @@ -193,26 +183,23 @@ export default function OfficeDetailScreen() { {/* FAVORITE */} toggleFavorite(office.id)} disabled={pendingOfficeId === office.id} > {pendingOfficeId === office.id - ? '...' + ? "..." : isFav - ? '★ Guardado' - : '☆ Guardar como favorito'} + ? "★ Guardado" + : "☆ Guardar como favorito"} {/* RESERVE BUTTON */} - - Reservar ahora - + Reservar ahora - - + + ); } const styles = StyleSheet.create({ container: { - paddingVertical: theme.spacing.xl, + flex: 1, + backgroundColor: theme.colors.background, + }, + + // cabecera superior con el mismo patron que reservas + topBar: { + backgroundColor: theme.colors.surface, + borderBottomWidth: 1, + borderBottomColor: theme.colors.border, + paddingHorizontal: theme.spacing.xl, + paddingTop: theme.spacing.xxxl, + paddingBottom: theme.spacing.lg, + }, + + // contenido centrado de la cabecera + topBarContent: { + maxWidth: theme.layout.contentWidth, + width: "100%", + alignSelf: "center", + }, + + // texto para volver al listado + topBarBack: { + color: theme.colors.textSecondary, + fontSize: theme.typography.md, + }, + + // scroll principal + scroll: { + flex: 1, + backgroundColor: theme.colors.background, }, + // contenido interno del scroll content: { - width: '100%', + width: "100%", maxWidth: theme.layout.contentWidth, - alignSelf: 'center', + alignSelf: "center", paddingHorizontal: theme.spacing.xl, + paddingTop: theme.spacing.lg, + paddingBottom: theme.spacing.xxxl, gap: theme.spacing.xl, }, center: { flex: 1, - justifyContent: 'center', - alignItems: 'center', + justifyContent: "center", + alignItems: "center", padding: theme.spacing.xl, gap: theme.spacing.md, - }, - - back: { - color: theme.colors.textSecondary, - fontSize: theme.typography.md, + backgroundColor: theme.colors.background, }, imageBox: { - width: '100%', + width: "100%", height: 180, borderRadius: theme.radius.xl, backgroundColor: theme.colors.primarySoft, - alignItems: 'center', - justifyContent: 'center', - }, - - imageIcon: { - fontSize: 48, + alignItems: "center", + justifyContent: "center", }, titleRow: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'flex-start', + flexDirection: "row", + justifyContent: "space-between", + alignItems: "flex-start", gap: theme.spacing.md, }, + titleBlock: { + flex: 1, + }, + title: { fontSize: theme.typography.xxxl, fontWeight: theme.fontWeight.semibold, @@ -289,34 +303,28 @@ const styles = StyleSheet.create({ }, metaRow: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", }, meta: { color: theme.colors.textSecondary, }, - price: { - color: theme.colors.primary, - fontSize: theme.typography.xxl, - fontWeight: theme.fontWeight.semibold, - }, - card: { backgroundColor: theme.colors.surface, - borderRadius: theme.radius.lg, + borderRadius: theme.radius.xxl, padding: theme.spacing.lg, borderWidth: 1, borderColor: theme.colors.border, + gap: theme.spacing.md, ...theme.shadows.card, }, sectionTitle: { - fontSize: theme.typography.lg, + fontSize: theme.typography.xl, fontWeight: theme.fontWeight.semibold, - marginBottom: theme.spacing.sm, color: theme.colors.text, }, @@ -347,8 +355,8 @@ const styles = StyleSheet.create({ inlineState: { marginTop: theme.spacing.md, - flexDirection: 'row', - alignItems: 'center', + flexDirection: "row", + alignItems: "center", gap: theme.spacing.sm, }, @@ -418,11 +426,11 @@ const styles = StyleSheet.create({ padding: theme.spacing.md, borderRadius: theme.radius.md, backgroundColor: theme.colors.divider, - alignItems: 'center', + alignItems: "center", }, favoriteButtonActive: { - backgroundColor: '#ffe8a3', + backgroundColor: "#ffe8a3", }, favoriteText: { @@ -434,7 +442,7 @@ const styles = StyleSheet.create({ backgroundColor: theme.colors.primary, paddingVertical: theme.spacing.lg, borderRadius: theme.radius.lg, - alignItems: 'center', + alignItems: "center", }, reserveText: { @@ -459,4 +467,4 @@ const styles = StyleSheet.create({ padding: theme.spacing.md, borderRadius: theme.radius.md, }, -}); +}); \ No newline at end of file -- cgit v1.2.3-54-g00ecf